package com.qf.controller;

import com.qf.pojo.City;
import com.qf.service.CityService;
import com.qf.vo.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/city")
public class CityController {

    @Autowired
    CityService cityService;


    @RequestMapping(value = "/findAllCity",method = RequestMethod.POST)
    public BaseResult findAllCity(@RequestBody City city){
        int id = city.getId();
        return cityService.findAllCity(id);
    }
    @RequestMapping(value = "/citys",method = RequestMethod.GET)
    public BaseResult citys(@RequestParam("getid") int getid,@RequestParam("backid") int backid){
        return cityService.viewCity(getid, backid);
    }

}
